<?php
// request报错或者请求错误跳转的路由
Route::get('/', 'BaseController@error');
$projectBasePath = base_path().DIRECTORY_SEPARATOR;// 项目的根路径
$projectRouteBasePath = $projectBasePath.'routes/';// 路由的根路径
// 引入后台登录、注册等路由
include $projectRouteBasePath.'Auth/_all.php';
// 工具
include $projectRouteBasePath.'tools/_all.php';
// 所有路由
include $projectRouteBasePath.'_all.php';
//// 文件上传实例
//Route::post('file/uploadss', function(Request $request) {
//    // 获取当前认证用户...
//    if ($request->hasFile('photo') && $request->file('photo')->isValid()) {
//        $photo = $request->file('photo');
//        $extension = $photo->extension();
//        $store_result = $photo->store('photo');
////        $store_result = $photo->storeAs('photo', 'test.jpg');
//        $output = [
//            'extension' => $extension,
//            'store_result' => $store_result
//        ];
//        print_r($output);exit();
//    }
//    exit('未获取到上传文件或上传过程出错');
//});
//兜底路由
//Route::fallback(function () {
//    return json_encode(['code'=>-1,'message'=>'该路由不存在，请重新输入!']);
//});

